package org.readium.r2.testapp.data.model

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey
import androidx.room.Index

@Entity(
    tableName = Vocabulary.TABLE_NAME,
    indices = [Index(value = [Vocabulary.MARKED])]
)
data class Vocabulary (
    @PrimaryKey
    @ColumnInfo(name = ENTRY)
    val entry : String,
    @ColumnInfo(name = DEFINITION)
    var definition : String,
    @ColumnInfo(name = MARKED)
    var isMarked : Boolean
) {

    companion object {

        const val TABLE_NAME = "dictionary"
        const val ENTRY = "entry"
        const val DEFINITION = "definition"
        const val MARKED = "isMarked"
    }
}
